using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;

namespace CPGVertragsverwaltung.Viewer
{
    public delegate void ButtonStatusChangedDelegate();
    public class AMainViewer:UserControl
    {
        public virtual event ButtonStatusChangedDelegate ButtonStatusChanged;

        protected Boolean mCanActual, mCanEdit, mCanCopy, mCanSave, mCanDelete, mCanNew;
        public Boolean CanActual { get { return mCanActual; } }
        public Boolean CanEdit { get{return mCanEdit;}}
        public Boolean CanDelete { get { return mCanDelete; } }
        public Boolean CanCopy { get { return mCanCopy; } }
        public Boolean CanSave { get { return mCanSave; } }
        public Boolean CanNew { get { return mCanNew; } }


        public virtual void Actual() { }
        public virtual void Delete() { }
        public virtual void Copy() { }
        public virtual void Save() { }
        public virtual void Edit() { }
        public virtual void New() { }


        protected void fireButtonStatusChanged()
        {
            if (ButtonStatusChanged != null)
                this.ButtonStatusChanged();
        }
    }
}
